<?php

class CateModel extends Model
{
	static public function getInstance()
	{
		static $_obj = null;
		if($_obj == null){
			$_obj = M('Goods_cat');
		}
		return $_obj;
	}

	static public function getCateByPid($cid, $order = array())
	{
		$map['pid'] = $cid;
		$map['is_active'] = 0;
		return self::getInstance()->where($map)->order($order)->select();
	}
}